import { EggAppConfig, PowerPartial } from "egg";

export default () => {
  const config: PowerPartial<EggAppConfig> = {};

  config.logger = {
    level: "DEBUG",
    outputJSON: true,
    consoleLevel: "DEBUG",
  };

  const redisConfig = {
    port: 6379, // Redis port
    // host: "192.168.0.123", // Redis host
    host: "127.0.0.1",
    password: "H4OpYA50LNnqBK8k",
    db: 0,
  };

  config.redis = {
    client: {
      port: redisConfig.port, // Redis port
      host: redisConfig.host, // Redis host
      password: redisConfig.password,
      db: redisConfig.db,
    },
  };

  config.thirdPartyConfig = {
    cewechat: {
      // url: "http://111.229.154.22:2531/v2/api",
      // url: "http://192.168.0.244:2531/v2/api",
      url: "http://192.168.0.125:2531/v2/api",
    },
    siliconflow: {
      url: "https://api.siliconflow.cn/v1",
      api: "sk-dwsykgatjmgvlvpxjwupzmjstjqpvzcfrupzrzvbmldgkxee",
    },
  };

  return config;
};
